//
//  nevarByxqItems.m
//  lyxluyou
//
//  Created by mmyy on 15/10/18.
//  Copyright (c) 2015年 mmyy. All rights reserved.
//

#import "nevarByxqItems.h"

@implementation nevarByxqItems
+(instancetype)nevarByxqItemsWithDict:(NSDictionary *)dict
{
    nevarByxqItems *items = [[nevarByxqItems alloc] init];
    items.address = dict[@"address"];
    items.arrival_typel = dict[@"arrival_type"];
    items.rating = dict[@"rating"];
    items.rating_users = dict[@"rating_users"];
    items.recommended_reason = dict[@"recommended_reason"];
    items.vdescription = dict[@"description"];
    items.opening_time = dict[@"opening_time"];
    items.lat = [dict[@"location"] objectForKey:@"lat"];
    items.lng = [[dict objectForKey:@"location"] objectForKey:@"lng"] ;
    items.name = dict[@"name"];
    items.photo_count = dict[@"photo_count"];
    items.tel = dict[@"tel"];
    items.vid = dict[@"id"];
    if (![[dict objectForKey:@"hottest_places"] isKindOfClass:[NSNull class]]) {
        NSArray *array = [dict objectForKey:@"hottest_places"];
        if (array.count >= 1) {
            items.photo = [[array objectAtIndex:0] objectForKey:@"photo"];
            }
        
        }
    
    return items;
}
@end
